// recordset.h: interface for the CLRecordset class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RECORDSET_H__17B60DEE_B37D_4B10_93E1_6B673C77F67E__INCLUDED_)
#define AFX_RECORDSET_H__17B60DEE_B37D_4B10_93E1_6B673C77F67E__INCLUDED_

#include "str.h"	// Added by ClassView
#include "sql.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CLRecordset
{
public:
	int prev();
	int seek(int pos);
	int error();
	int nextpage();
	int prevpage();
	int openpage(LPCSTR sql_select,LPCSTR sql_where,int page,int pagesize);
	int prevstart();
	int nextstart();
	int curpage();
	int totalpage();
	int eof();
	int next();
	int open(LPCSTR sql);
	int open(LPCSTR sql_select,LPCSTR sql_where,int start=0,int show=-1);
	int empty();
	CLStr field(LPCSTR name);
	CLStr field(int index);
	CLRecordset(CLSql* pdb);
	virtual ~CLRecordset();
//private:
	CLSql* m_pdb;
	void clean();
	int m_pos;
	int m_total;
	int m_start;
	int m_pagesize;
	CLStrList m_row;
	CLStrList m_record;
	CLStrList m_field;
	CLStr m_error;
};

#endif // !defined(AFX_RECORDSET_H__17B60DEE_B37D_4B10_93E1_6B673C77F67E__INCLUDED_)
